package team.knowers.agency.controller;

import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import team.knowers.agency.common.convention.result.Result;
import team.knowers.agency.common.convention.result.Results;
import team.knowers.agency.dto.req.MoreBookingCreateReqDTO;
import team.knowers.agency.service.BookingService;

import java.util.Map;

@RestController
@RequiredArgsConstructor
public class BookingController {
    private final BookingService bookingService;
    /**
     * 批量创建预订订单
     * @param req
     * @return
     */
    @PutMapping("/api/agency/booking/createBooking")
    public Result<Map<String,Integer>> moreCreateBooking(@RequestBody MoreBookingCreateReqDTO req)
    {
        return Results.success(bookingService.moreCreateBooking(req));
    }

}
